package com.fwpsl.springframework.annotation.importA;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author: 风戏fw
 * @date: 2024/5/21
 * @description:
 */
public class MyImportSelector implements ImportSelector {
    //返回值就是导入容器的组件全类目
    // AnnotationMetadata 当前标注@Import注解的类的所有注解信息
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        //importingClassMetadata.get
        return new String[]{"com.fwpsl.springframework.annotation.importA.bean.Yellow",
                "com.fwpsl.springframework.annotation.importA.bean.Red"};
    }
}